Ext.define('DCApp.view.contribution.Detail', {
	extend: 'DCApp.view.Detail',
    alias: 'widget.contributiondetail',
    
    bind: {
        title: '捐献 - 【{theObj.conId}】'
    },
    
    componentCls: 'contribution-detail',
    bodyPadding: 0,
    
    controller: 'detail',
    viewModel: {
        type: 'contributiondetail'
    },
    
    tbar: ['->',{
        text: '保存',
        handler: 'onSaveClick'
    },
    {
        text: '返回',
        handler: 'onBackClick'
    }],
    
    afterRender: function(ct, position) {
    	this.callParent();
    },
    
    items: [
    	{
	        id:'panel0',
    		listeners: {
				render: function(p) {
					p = p.getEl();
					var me = this.up();
					me.h0 = p.getHeight();
			    	p.on('scroll', function(e, t) {
			    		me.onscroll(t.scrollTop,t.clientHeight);
			    	}, p);
			  	}
			},
    		title: 'Panel 0',
        	flex: 2,
        	frame: false,
        	xtype: 'container',
        	layout: 'anchor',
        	style: {
            	overflow: 'auto'
        	},
        	items: [
        	   {        		
        		title : '捐赠信息',
				margin : '0 0 10 0',
				cls : 'nav_pos',
				reference : 'form',
				bodyPadding : 10,
				fieldDefaults : {
					labelAlign : 'right',
					labelWidth : 100,
					padding : 3
				},
				defaults : {
					anchor : '100%'
				},
				xtype: 'form',
				items: [
					{
                        xtype: 'container',
                        layout: 'hbox',
                        combineErrors: true,
                        defaultType: 'textfield',
                        items:[
                			{
                        		flex: 1,
		                        xtype: 'displayfield',
		                        fieldLabel: '捐献物ID',
		                        allowBlank: false,
		                        bind: '{theObj.conId}',
		                        publishes: ['value']
		                    },
		                    {
		                    	flex: 1,
		                        xtype: 'textfield',
		                        fieldLabel: '捐献物名称',
		                        allowBlank: false,
		                        bind: '{theObj.conName}',
		                        publishes: ['value']
		                    }		                        
                		]
            		},
            		{
                        xtype: 'container',
                        layout: 'hbox',
                        combineErrors: true,
                        defaultType: 'textfield',
                        items:[
                			{
                        		flex: 1,
		                        xtype: 'textfield',
		                        fieldLabel: '捐献物时代',
		                        allowBlank: false,
		                        bind: '{theObj.conEra}',
		                        publishes: ['value']
		                    },
		                    {
		                    	flex: 1,
		                        xtype: 'textfield',
		                        fieldLabel: '捐献物作者',
		                        allowBlank: false,
		                        bind: '{theObj.conAuthor}',
		                        publishes: ['value']
		                    }		                        
                		]
            		},
            		{
                        xtype: 'container',
                        layout: 'hbox',
                        combineErrors: true,
                        defaultType: 'textfield',
                        items:[
                			{
                        		flex: 1,
		                        xtype: 'textfield',
		                        fieldLabel: '捐献物类别',
		                        allowBlank: false,
		                        bind: '{theObj.conClass}',
		                        publishes: ['value']
		                    },
		                    {
		                    	flex: 1,
		                        xtype: 'textfield',
		                        fieldLabel: '捐献物相关对象ID',
		                        allowBlank: false,
		                        bind: '{theObj.conObjid}',
		                        publishes: ['value']
		                    }		                        
                		]
            		},
            		{
                        xtype: 'container',
                        layout: 'hbox',
                        combineErrors: true,
                        defaultType: 'textfield',
                        items:[
                			{
                        		flex: 1,
		                        xtype: 'textfield',
		                        fieldLabel: '时代ID',
		                        allowBlank: false,
		                        bind: '{theObj.eraId}',
		                        publishes: ['value']
		                    },
		                    {
		                    	flex: 1,
		                        xtype: 'textfield',
		                        fieldLabel: '捐献物相关对象文物编号',
		                        allowBlank: false,
		                        bind: '{theObj.conObjno}',
		                        publishes: ['value']
		                    }		                        
                		]
            		}
				]
        	}
        	
                
            ]
        }
	]
});
